import {RouteRecordRaw,createRouter,createWebHashHistory} from 'vue-router'
const routes:Array<RouteRecordRaw>=[
    {
        path:'/home',
        component:()=>import('@/views/Home.vue')
    },
    {
        path:'/about',
        component:()=>import('@/views/About.vue')
    },
    {
        path:'/news/:id',
        component:()=>import('@/views/NewsDetail.vue')
    },
    {
        path:'/newsModify',
        component:()=>import('@/views/NewsUpdate.vue')
    }
]
//创建router对象
const router=createRouter({
    routes,
    history:createWebHashHistory()
})


export default router
